Class TreeNodeImpl

java.lang.Object
com.cisco.pt.ipc.impl.IPCObjectImpl
com.cisco.pt.ipc.system.impl.TreeNodeImpl
All Implemented Interfaces:
IPCObject, TreeNode

public class TreeNodeImpl extends IPCObjectImpl implements TreeNode
Information provided by the PKI file:

    \class TreeNode
    
    \brief TreeNode handles and manipulates the activity assessment nodes.
    
    \example appWindow().getActiveFile().getLastAssessedComparatorTree()
    
Author:
Auto-generated
  • Constructor Details

  • Method Details

    • getNodeId

      public String getNodeId()
      Information provided by the PKI file:
      
          \brief Returns the ID of this node.
          
          \return QString, the ID of this node.
          
              
      Specified by:
      getNodeId in interface TreeNode
      Returns:
      String Returns a String
    • getNodeName

      public String getNodeName()
      Information provided by the PKI file:
      
          \brief Returns the name of this node.
          
          \return QString, the name of this node.
          
              
      Specified by:
      getNodeName in interface TreeNode
      Returns:
      String Returns a String
    • getNodeValue

      public String getNodeValue()
      Information provided by the PKI file:
      
          \brief Returns the value of this node.
          
          \return QString, the value of this node.
          
              
      Specified by:
      getNodeValue in interface TreeNode
      Returns:
      String Returns a String
    • getParentNode

      public TreeNode getParentNode()
      Information provided by the PKI file:
      
          \brief Returns the parent node of this node.
          
          \return TreeNode, the TreeNode object of the parent node of this node.
          
              
      Specified by:
      getParentNode in interface TreeNode
      Returns:
      TreeNode Returns a TreeNode
    • getChildCount

      public int getChildCount()
      Information provided by the PKI file:
      
          \brief Returns the number of child nodes for this node.
          
          \return int, the number of child nodes for this node.
          
              
      Specified by:
      getChildCount in interface TreeNode
      Returns:
      int Returns a int
    • getCheckType

      public ActivityCheckType getCheckType()
      Information provided by the PKI file:
      
          \brief Returns the checktype of this node.
          
          \return int,        the checktype for this node.
          Checktypes: eCheckTypeBlank = 0,
          eCheckTypeHalf = 1,
          eCheckTypeFull = 2
          
          \remark Full is correct, blank is incorrect, and half means there are correct and incorrect children.
          
              
      Specified by:
      getCheckType in interface TreeNode
      Returns:
      ActivityCheckType Returns a ActivityCheckType
    • getChildNodeAt

      public TreeNode getChildNodeAt(int index)
      Information provided by the PKI file:
      
          \brief Returns the child node at the specified index of this node.
          
          \param index, the index of the child node of interest.
          
          \return TreeNode, the child node at the specified index of this node.
          
              
      Specified by:
      getChildNodeAt in interface TreeNode
      Parameters:
      index - Takes in a parameter of index
      Returns:
      TreeNode Returns a TreeNode
    • getChildNodeBy

      public TreeNode getChildNodeBy(String id)
      Information provided by the PKI file:
      
          \brief Returns the child node with the specified ID of this node.
          
          \param ID, the ID of the child node of interest.
          
          \return TreeNode, the child node with the specified ID of this node.
          
              
      Specified by:
      getChildNodeBy in interface TreeNode
      Parameters:
      id - Takes in a parameter of id
      Returns:
      TreeNode Returns a TreeNode
    • getCheckOnlyTree

      public TreeNode getCheckOnlyTree()
      Information provided by the PKI file:
      
          \brief Returns a tree with only half or full checktype nodes.
          
          \return TreeNode, the TreeNode object with only half or full checktype nodes.
          
              
      Specified by:
      getCheckOnlyTree in interface TreeNode
      Returns:
      TreeNode Returns a TreeNode
    • getIncorrectFeedback

      public String getIncorrectFeedback()
      Information provided by the PKI file:
      
          \brief Returns the incorrect feedback of this node.
          
          \return QString, the incorrect feedback of this node.
          
              
      Specified by:
      getIncorrectFeedback in interface TreeNode
      Returns:
      String Returns a String
    • setIncorrectFeedback

      public void setIncorrectFeedback(String feedbackStr)
      Information provided by the PKI file:
      
          \brief Sets the incorrect feedback for this node.
          
          \param feedbackStr, the incorrect feedback for this node.
          
              
      Specified by:
      setIncorrectFeedback in interface TreeNode
      Parameters:
      feedbackStr - Takes in a parameter of feedbackStr
    • getLeafCount

      public int getLeafCount()
      Information provided by the PKI file:
      
          \brief Returns the total number of leaf nodes for this node.
          
          \return int, the total number of leaf nodes for this node.
          
              
      Specified by:
      getLeafCount in interface TreeNode
      Returns:
      int Returns a int
    • getCheckLeafCount

      public int getCheckLeafCount()
      Information provided by the PKI file:
      
          \brief Returns the number of full checktype leaf nodes.
          
          \return int, the number of full checktype leaf nodes.
          
              
      Specified by:
      getCheckLeafCount in interface TreeNode
      Returns:
      int Returns a int
    • getTotalLeafPoints

      public int getTotalLeafPoints()
      Information provided by the PKI file:
      
          \brief Returns the total points of leaf nodes.
          
          \return int, the total points of leaf nodes.
          
              
      Specified by:
      getTotalLeafPoints in interface TreeNode
      Returns:
      int Returns a int
    • isVariableEnabled

      public boolean isVariableEnabled()
      Information provided by the PKI file:
      
          \brief Returns true if this node is variable enabled, otherwise false.
          
          \return bool, true if this node is variable enabled, otherwise false.
          
              
      Specified by:
      isVariableEnabled in interface TreeNode
      Returns:
      boolean Returns a boolean
    • getVariableName

      public String getVariableName()
      Information provided by the PKI file:
      
          \brief Returns the variable name of this node.
          
          \return QString, the variable name of this node.
          
              
      Specified by:
      getVariableName in interface TreeNode
      Returns:
      String Returns a String
    • getVariableToString

      public String getVariableToString()
      Information provided by the PKI file:
      
          \brief Returns the variable name if the value type of the node is entire range, otherwise the value of this node.
          
          \return QString, the variable name if the value type of the node is entire range, otherwise the value of this node.
          
              
      Specified by:
      getVariableToString in interface TreeNode
      Returns:
      String Returns a String
    • setCheck

      public void setCheck(boolean bCheck)
      Information provided by the PKI file:
      
          \brief Checks or unchecks this node.
          
          \param bCheck, true to check this node, false to uncheck it.
          
              
      Specified by:
      setCheck in interface TreeNode
      Parameters:
      bCheck - Takes in a parameter of bCheck
    • getComparatorClass

      public ComparatorClass getComparatorClass()
      Information provided by the PKI file:
      
          \brief Returns the comparator class.
          
          \return ComparatorClass,    the comparator class.
          eCompClass_Ip = 0,
          eCompClass_Routing = 1,
          eCompClass_Acl = 2,
          eCompClass_Nat = 3,
          eCompClass_Physical = 4,
          eCompClass_Switching = 5,
          eCompClass_Connectivity = 6,
          eCompClass_Logical = 7,
          eCompClass_All = 8,
          eCompClass_Encircling_Head = 9,
          eCompClass_Encircling_Sub = 10
          
              
      Specified by:
      getComparatorClass in interface TreeNode
      Returns:
      ComparatorClass Returns a ComparatorClass
    • setNodeName

      public void setNodeName(String name)
      Information provided by the PKI file:
      
          \brief Sets the node of this node.
          
          \param name, the node of this node.
          
              
      Specified by:
      setNodeName in interface TreeNode
      Parameters:
      name - Takes in a parameter of name
    • setNodeValue

      public void setNodeValue(String value)
      Information provided by the PKI file:
      
          \brief Sets the value of this node.
          
          \param value, the value of this node.
          
              
      Specified by:
      setNodeValue in interface TreeNode
      Parameters:
      value - Takes in a parameter of value
    • getLeafCountByComponent

      public int getLeafCountByComponent(String component)
      Information provided by the PKI file:
      
          \brief Returns the number of leaves with the specified component name (includes all children).
          
          \param component, the name of the component of interest.
          
          \return int, the number of leaves with the specified component name (includes all children).
          
              
      Specified by:
      getLeafCountByComponent in interface TreeNode
      Parameters:
      component - Takes in a parameter of component
      Returns:
      int Returns a int
    • getCheckLeafCountByComponent

      public int getCheckLeafCountByComponent(String component)
      Information provided by the PKI file:
      
          \brief Returns the number of checked leaves with the specified component name (including all children).
          
          \param component, the name of the component of interest.
          
          \return int, the number of checked leaves with the specified component name (including all children).
          
              
      Specified by:
      getCheckLeafCountByComponent in interface TreeNode
      Parameters:
      component - Takes in a parameter of component
      Returns:
      int Returns a int
    • getCheckLeafPointsByComponent

      public int getCheckLeafPointsByComponent(String component)
      Information provided by the PKI file:
      
          \brief Returns the total points of checked leaves with the specified component name (including all children).
          
          \param component, the name of the component of interest.
          
          \return int, the total points of checked leaves with the specified component name (including all children).
          
              
      Specified by:
      getCheckLeafPointsByComponent in interface TreeNode
      Parameters:
      component - Takes in a parameter of component
      Returns:
      int Returns a int
    • getTotalLeafPointsByComponent

      public int getTotalLeafPointsByComponent(String component)
      Information provided by the PKI file:
      
          \brief Returns the total points of leaves with the specified component name (including all children).
          
          \param component, the name of the component of interest.
          
          \return int, the total points of leaves with the specified component name (including all children).
          
              
      Specified by:
      getTotalLeafPointsByComponent in interface TreeNode
      Parameters:
      component - Takes in a parameter of component
      Returns:
      int Returns a int
    • getCheckLeafPoints

      public int getCheckLeafPoints()
      Information provided by the PKI file:
      
          \brief Returns the total points of all nodes that have checks, including all children.
          
          \return int, the total points of all nodes that have checks, including all children.
          
              
      Specified by:
      getCheckLeafPoints in interface TreeNode
      Returns:
      int Returns a int
    • getCompPointPair

      public Pair<String,String> getCompPointPair()
      Information provided by the PKI file:
      
          \brief Returns the component and points as a pair associated with only this node. There can be many components and points per node.
          
          \return pair<QString, QString>, the list of comma-separated components and list of comma-separated points.
          
              
      Specified by:
      getCompPointPair in interface TreeNode
      Returns:
      Pair<String, String> Returns a Pair<String, String>
    • getChildNodeByFullId

      public TreeNode getChildNodeByFullId(String id)
      Information provided by the PKI file:
      
          \brief Returns the child node with the specified full ID of this node.
          
          \param ID, the full ID of the child node of interest.
          
          \return TreeNode, the child node with the specified full ID of this node.
          
              
      Specified by:
      getChildNodeByFullId in interface TreeNode
      Parameters:
      id - Takes in a parameter of id
      Returns:
      TreeNode Returns a TreeNode
    • addChildNode

      public TreeNode addChildNode(ComparatorClass classType, String nodeName, String nodeId, String nodeValue, boolean bVariableEnabled)
      Information provided by the PKI file:
      
          \brief Create a new child node and add it to the tree
          
          \param classType, ComparatorClass
          eCompClass_Ip = 0,
          eCompClass_Routing = 1,
          eCompClass_Acl = 2,
          eCompClass_Nat = 3,
          eCompClass_Physical = 4,
          eCompClass_Switching = 5,
          eCompClass_Connectivity = 6,
          eCompClass_Logical = 7,
          eCompClass_All = 8,
          eCompClass_Encircling_Head = 9,
          eCompClass_Encircling_Sub = 10
          
          \param nodeName, the name of the node.
          
          \param nodeId, the id of the node.
          
          \param nodeValue, the value of the node.
          
          \param bVariableEnabled, bool-true if variable is enabled and false if it's not on this node
          
          \return TreeNode, the child node that was newly created
          
              
      Specified by:
      addChildNode in interface TreeNode
      Parameters:
      classType - Takes in a parameter of classType
      nodeName - Takes in a parameter of nodeName
      nodeId - Takes in a parameter of nodeId
      nodeValue - Takes in a parameter of nodeValue
      bVariableEnabled - Takes in a parameter of bVariableEnabled
      Returns:
      TreeNode Returns a TreeNode